﻿Imports System.Data
Imports System.Data.Odbc
Imports WSEntidades
Public Class MovvendedorFact
    Public Shared Function Build(ByVal dr As OdbcDataReader) As MovvendedorBE
        Dim tmpMovvendedor As MovvendedorBE = New MovvendedorBE()
        Try
            With tmpMovvendedor
                .Cantidad = convertDTFromDb.ConvertDecimal(dr.Item("Cantidad"))
                .ClaveMat = convertDTFromDb.ConvertString(dr.Item("ClaveMat"))
                .Concepto = convertDTFromDb.ConvertString(dr.Item("Concepto"))
                .Fecha = convertDTFromDb.convertDateTime(dr.Item("Fecha"))
                .IdEmpresa = convertDTFromDb.ConvertShort(dr.Item("IdEmpresa"))
                .IdMov = convertDTFromDb.ConvertLong(dr.Item("IdMov"))
                .IdVendedor = convertDTFromDb.convertInt32(dr.Item("IdVendedor"))
                .Status = convertDTFromDb.ConvertString(dr.Item("Status"))
                .TipoM = convertDTFromDb.ConvertString(dr.Item("TipoM"))
            End With
            Return tmpMovvendedor
        Catch ex As Exception
            Throw
        Finally
            tmpMovvendedor = Nothing
        End Try
    End Function
End Class
